<template>
	<view>
		<view v-for="(item, k) in list" :key="k">
			<view class="msg_cell">
				<view class="cnt_box">
					<view class="cnt_time">
						{{ item.createTime }}
						
					</view>
				</view>
				<view class="title_box">
					<view class="title_text">
						<span>{{ item.title }}</span>
					</view>
					<view class="tag_box">
						<u-tag size="mini" :text="statusText[item.label]" type="warning" />
						<!-- <u-tag v-if="item.isRead == 0" size="mini" text="未读" type="error" />
						<u-tag v-if="item.isRead == 1" text="已读" type="info" /> -->
					</view>
				</view>
		
				<view class="cnt_box">
					<view class="cnt_text">
						{{ item.content }}
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	
	export default {
		name: 'msgCell',
		props: {
			list:{
				type: Array,
				default: {
				    return: []
				}
			}
		},
		data: () => ({
			// 类型文本
			statusText: ['', '任务', '日志', 'oa审批', '公告', '撤回', '日程', 'crm消息'],
		}),
		methods: {
			
		}
	}
</script>

<style>
.msg_cell {
	padding: 10px 5px 10px 5px;
	margin-left: 5.5px;
	margin-right: 7px;
	margin-top: 7px;
	border-radius: 8px;
	background-color: #ffffff;
}
.title_box {
	height: 25px;
	line-height: 25px;
}
.title_text {
	float: left;
	width: 50%;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.title_text span {
	display: inline-block;
	font-size: 16px;
	font-weight: 500;
}
.tag_box {
	float: right;
	width: calc(50%-25px);
	text-align: right;
	margin-right: 10px;
}
.cnt_box {
	max-height: 70px;
	color: #717073;
}
.cnt_text {
	margin-left: 1px;
	width: 100%;
	text-overflow: ellipsis;
	overflow: hidden;
}
.cnt_time {
	margin-left: 1px;
	width: 100%;
	text-overflow: ellipsis;
	overflow: hidden;
	height: 20px;
	line-height: 20px;
}
</style>
